//#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_unloadsetcargo.sqf"
#include "x_setup.sqf"

#include "x_uiinc.sqf"

private ["_index", "_disp"];
disableSerialization;
_disp = __uiGetVar(GVAR(UNLOAD_DIALOG));
_index = lbCurSel (_disp displayCtrl 101115);
if (_index < 0) exitWith {closeDialog 0};
GVAR(cargo_selected_index) = _index;
closeDialog 0;